package com.tanger.im.entity;

import com.tanger.common.jpa.IDEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description IM用户分组成员实体类
 * @Author Hchenbin
 * @Date 2023/12/25 16:28
 * @Version 1.0
 */
@Data
@Entity
@NoArgsConstructor
@Api(value = "IMUserGroupMembers", tags= " IM用户分组成员实体类")
@Table(name = "im_user_group_members")
public class ImUserGroupMembers extends IDEntity implements Serializable {

	@Column(columnDefinition = "bigint(20) NOT NULL COMMENT '分组ID'")
	@ApiModelProperty(value = "分组ID")
	private Long groupId;
	@Column(columnDefinition = "bigint(20) NOT NULL COMMENT 'IM用户ID'")
	@ApiModelProperty(value = "IM用户ID")
	private Long userId;
	@Column(columnDefinition = "varchar(80) NOT NULL COMMENT '成员名称'")
	@ApiModelProperty(value = "成员名称")
	private String name;
	@Column(columnDefinition = "varchar(80) NOT NULL COMMENT '成员群昵称'")
	@ApiModelProperty(value = "成员群昵称")
	private String nickName;
	@Column(columnDefinition = "varchar(255) DEFAULT NULL COMMENT '成员头像'")
	@ApiModelProperty(value = "成员头像")
	private String avatar;
	@Column(columnDefinition = "int(1) NOT NULL COMMENT '是否群主(1.是 0.否)'")
	@ApiModelProperty(value = "是否群主(1.是 0.否)")
	private Integer isCreator;
	@Column(columnDefinition = "int(1) NOT NULL COMMENT '是否管理员(1.是 0.否)'")
	@ApiModelProperty(value = "是否管理员(1.是 0.否)")
	private Integer isAdmin;
	@Column(columnDefinition = "int(1) NOT NULL COMMENT '是否禁言(1.是 0.否)'")
	@ApiModelProperty(value = "是否禁言(1.是 0.否)")
	private Integer isProhibition;

	public ImUserGroupMembers(Long groupId, Long userId) {
		this.groupId = groupId;
		this.userId = userId;
	}

	public ImUserGroupMembers(Integer isCreator) {
		this.isCreator = isCreator;
	}
}
